home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / pascal / gtmous13.zip / LIBDEMO.PAS < prev    next >
Pascal/Delphi Source File  |  1993-06-23  |  3KB  |  68 lines

  1. {*********************************************************}
  2. {*                   GtMOUSE.PAS 1.00                    *}
  3. {*  Copyright (c) I.Evsikov, S.Shmakov & P.Sychov, 1993  *}
  4. {*                 All rights reserved.                  *}
  5. {*                 Demo with mouseLib6                   *}
  6. {*********************************************************}
  7. program LibDemo;
  8.  
  9. uses
  10.    gtMouse,
  11.    mouseLib,
  12.    Crt;
  13.  
  14. var Finish : boolean;
  15. begin
  16.      clrScr;
  17.      Finish:=false;
  18.      if not (mouse_present) then begin
  19.      { mouse_present was set by the mouseLib initialization code .. }
  20.           write('mouse not installed');
  21.           exit;
  22.      end;
  23.      writeln;
  24.      writeln('          ┌──────────────────────────────────────────────────────────┐');
  25.      writeln('          │GtMouse with MouseLib6 demo program,(c) 1993 ,Igor Evsikov│');
  26.      writeln('          └──────────────────────────────────────────────────────────┘');
  27.      writeln('          ┌──────────────────────────────────────────────────────────┐');
  28.      writeln('          │          Move Cursor, Press Right & Left buttons         │');
  29.      writeln('          │                    Press Esc for Exit                    │');
  30.      writeln('          └──────────────────────────────────────────────────────────┘');
  31.      writeln('          ┌──────────────────────────────────────────────────────────┐');
  32.      writeln('          │                                                          │');
  33.      writeln('          │                                                          │');
  34.      writeln('          │                                                          │');
  35.      writeln('          │                                                          │');
  36.      writeln('          │                                                          │');
  37.      writeln('          │                                                          │');
  38.      writeln('          │                                                          │');
  39.      writeln('          │                                                          │');
  40.      writeln('          │                                                          │');
  41.      writeln('          │                                                          │');
  42.      writeln('          │                                                          │');
  43.      writeln('          └──────────────────────────────────────────────────────────┘');
  44.      writeln('          ┌──────────────────────────────────────────────────────────┐');
  45.      writeln('          │                 S l e e p i n g   H e r e                │');
  46.      writeln('          └──────────────────────────────────────────────────────────┘');
  47.      window(30, 10, 60, 20);
  48.      InitSleepper(10,10,22,70,24);
  49.      showMouseCursor; { display the cursor }
  50.      repeat
  51.            if getButton(leftButton) = buttonDown then
  52.            begin
  53.               hideMouseCursor; { we hide the cursor }
  54.               writeLn('Left Button Pressed');
  55.               showMouseCursor; { display the cursor }
  56.            end;
  57.            if getButton(rightButton) = buttonDown then
  58.            begin
  59.               hideMouseCursor; { we hide the cursor }
  60.               writeLn('Right Button Pressed');
  61.               showMouseCursor; { display the cursor }
  62.            end;
  63.            if keypressed then Finish:=(readKey=^[);
  64.      until Finish;
  65.      hideMouseCursor; { we hide the cursor }
  66. end.
  67. 
  68.